﻿using LPY.LeHealth.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LPY.LeHealth.WebSite.Controllers
{
    public class InstallController : Controller
    {
        private InstallService service;
        public InstallController()
        {
            service = new InstallService();
        }

        public ActionResult Index()
        {
            return View();
        }


        public ActionResult User()
        {
            var rtv= service.InitalUser();
            if(rtv)
            {
                return Content("初始化用户表成功！");
            }
            else
            {
                 return Content("初始化用户表失败！");
            }
        }
        ///// <summary>
        ///// 提交订单人信息
        ///// </summary>
        ///// <returns></returns>
        //public ActionResult subscribe()
        //{
        //    var rtv = service.subscribe();
        //    if (rtv)
        //    {
        //        return Content("初始化成功！");
        //    }
        //    else
        //    {
        //        return Content("初始化失败！");
        //    }
        //}
        /// <summary>
        /// 热门推荐信息
        /// </summary>
        /// <returns></returns>
        public ActionResult recommend()
        {
            var rtv = service.recommend();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult Hospital()
        {
            var rtv = service.InitialHospital();
            if (rtv)
            {
                return Content("初始化医院表成功！");
            }
            else
            {
                return Content("初始化医院表失败！");
            }
        }

        public ActionResult Physical()
        {
            var rtv = service.InitialPhysical();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }

        public ActionResult Order()
        {
            var rtv = service.InitialOrder();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }

        public ActionResult City()
        {
            var rtv = service.InitialCity();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult Question()
        {
            var rtv = service.InitialQuestion();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult zhao()
        {
            var rtv = service.Initialzhao();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult combo2()
        {
            var rtv = service.Initialcombo2();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult speedy_dto()
        {
            var rtv = service.Initialspeedy_dto();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult capacity()
        {
            var rtv = service.Initialcapacity();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult Priv()
        {
            var rtv = service.InitialPriv();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult tuanOrder()
        {
            var rtv = service.InitialtuanOrder();
            if (rtv)
            {
                return Content("初始化团检订单表成功！");
            }
            else
            {
                return Content("初始化团检订单表失败！");
            }
        }
        public ActionResult Apptype()
        {
            var rtv = service.InitialApptype();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }

        public ActionResult App()
        {
            var rtv = service.InitialApp();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }

        public ActionResult image()
        {
            var rtv = service.Initialimage();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult tibao()
        {
            var rtv = service.Initialtibao();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }


        public ActionResult Crowd()
        {
            var rtv = service.InitialCrowd();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        public ActionResult ZuheComboDTO()
        {
            var rtv = service.InitialZuheComboDTO();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        //体检范围分类
        public ActionResult ClassifyType()
        {
            var rtv = service.InitialClassifyType();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }

        /// <summary>
        /// 体检项分类
        /// </summary>
        /// <returns></returns>
        public ActionResult Classify()
        {
            var rtv = service.InitialClassify();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
       
        /// <summary>
        /// 客服
        /// </summary>
        /// <returns></returns>
        public ActionResult Esq()
        {
            var rtv = service.InitialEsq();
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
        /// <summary>
        /// 体检指南类型
        /// </summary>
        /// <returns></returns>
       public ActionResult PhysicalType()
        {
            var rtv = service.InitialPhysicalType();
           if(rtv)
           {
               return Content("初始化成功！");
           }
           else
           {
               return Content("初始化失败！");
           }
        }

       public ActionResult PhysicalNan()
       {
           var rtv = service.InitialPhysicalNan();
           if (rtv)
           {
               return Content("初始化成功！");
           }
           else
           {
               return Content("初始化失败！");
           }
       }

        
            public ActionResult InitialReply()
        {
           var rtv = service.InitialReply();
           if (rtv)
           {
               return Content("初始化成功！");
           }
           else
           {
               return Content("初始化失败！");
           }
        }
        public ActionResult All()
        {
            var rtv = service.InitalUser();
            rtv = service.subscribe();
            rtv = service.recommend();
            rtv = service.InitialHospital();
            rtv = service.InitialPhysical();
            rtv = service.InitialOrder();
            rtv = service.InitialCity();
            rtv = service.InitialQuestion();
            rtv = service.Initialzhao();
            rtv = service.Initialcombo2();
            rtv = service.Initialspeedy_dto();
            rtv = service.Initialcapacity();
            rtv = service.InitialPriv();
            rtv = service.InitialtuanOrder();
            rtv = service.InitialApptype();
            rtv = service.InitialApp();
            rtv = service.Initialimage();
            rtv = service.Initialtibao();
            rtv = service.InitialCrowd();
            rtv = service.InitialZuheComboDTO();
            rtv = service.InitialClassifyType();
            rtv = service.InitialClassify();
            rtv = service.InitialEsq();
            rtv = service.InitialHospitalAdmin();
            rtv = service.InitialReply();
            
            if (rtv)
            {
                return Content("初始化成功！");
            }
            else
            {
                return Content("初始化失败！");
            }
        }
	}
}